<?php
$sSql ="Select banners.image, banners.id, banners.title_".$LANG." as title,   banners.description_".$LANG." as description,  banners.link From immo_banners banners Inner Join immo_agencys agencys On banners.agencyId = agencys.id Where agencys.id=".$agencyId;
      $rs=$GLOBALS["conn"]->Execute($sSql); 
			?>
    <script type="text/javascript">	
    if(!window.slider) var slider={};
	slider.data=new Array();
   </script>
   <div id="slide-holder">
   <div onclick="slider.left();" class="bannerImgLeft"><img  src="/theme/btn_right.png"/></div>
  <!--  --> 
  <div onclick="slider.right();" class="bannerImgRight"><img  src="/theme/btn_left.png"/></div>
<div id="slide-runner">
<?php
          while ( !$rs->EOF)  { 
		  ?>
 <div id="slide-div-<?php echo $rs->fields["id"]; ?>" class="bannerHolder slide" style="left: 0px; "> 
 <div class="bannerText"> <h1><?php echo $rs->fields["title"]; ?></h1> 
 <h2><?php echo $rs->fields["description"]; ?></h2> 

 </div> 
  <a href="<?php echo $rs->fields["link"]; ?>"><img src="/portal/banners/<?php echo $rs->fields["image"]; ?>"/></a> 
 </div>
	 <script type="text/javascript">	
		slider.data.push({"id":"slide-div-<?php echo $rs->fields["id"]; ?>","desc":""});
   </script>
				  <?php
		  $rs->MoveNext();    
		  }
?>
    <div id="slide-controls">
     <p id="slide-desc" class="text"></p>
     <p id="slide-nav"></p>
    </div>
</div>
</div>